import java.util.*;
import java.io.*;


public class MyFileReader {
    public static void main(String[] args) {
        String filename = args[0], out_filename = args[1], string = "";
        int c;
        File file = new File(filename), out_file = new File(out_filename);
        //byte[] chunks = new byte[(int)file.length()];
        try {
            InputStreamReader fis = new InputStreamReader(new BufferedInputStream(new FileInputStream(file), 1024), "ISO-8859-1");
            OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(out_file), "ISO-8859-1");
            
            while((c = fis.read()) != -1 && (char)c != '\n') {
                string += (char)c;
            }
            for(int i = 0; i < string.length(); i++) {
                out.write(string.charAt(i));
            }
            out.close();
        }
        catch(Exception e)
        {
            System.out.println("File not found" + e);
        }
    }
}